package com.bom_samaritano.dao;

public class Route extends VOGeneric {

	public static final String COL_ID = "id";
	public static final String COL_ORIGIN_LAT = "lat_origin";
	public static final String COL_ORIGIN_LON = "lon_origin";
	public static final String COL_DESTINATION_LAT = "lat_destination";
	public static final String DESTINATION_LON = "lon_destination";
	public static final String COL_OWNER = "person_id";
	public static final String TABLE = "route";

	private int id;
	private Coordinate startPoint;
	private Coordinate endPoint;

	public Route() {
		super(TABLE);
		// TODO Auto-generated constructor stub
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
		this.putParam(COL_ID, id);
	}

	public Coordinate getStartPoint() {
		return startPoint;
	}

	public void setStartPoint(Coordinate point) {
		this.startPoint = point;
		this.putParam(COL_ORIGIN_LAT, point.getLatitude());
		this.putParam(COL_ORIGIN_LON, point.getLongitude());
	}

	public Coordinate getEndPoint() {
		return endPoint;
	}

	public void setEndPoint(Coordinate point) {
		this.endPoint = point;
		this.putParam(COL_DESTINATION_LAT, point.getLatitude());
		this.putParam(DESTINATION_LON, point.getLongitude());
	}
}
